import http from "@/config/request";

// 获取员工列表
export function getEmployeeList({ current, size, name, department }) {
  return http.get(
    `/admin/list?current=${current}&size=${size}${name ? `&name=${name}` : ''}${department ? `&departmentName=${department}` : ''}`
  );
}

// 添加员工
export function addEmployee(data) {
  return http.post("/admin/employee/create", data);
}

// 编辑员工
export function editEmployee(data) {
  return http.put(`/admin/employee/edit/${data.id}`, data);
}

// 删除员工
export function deleteEmployee(employeeId) {
  return http.delete(`/admin/employee/delete?employeeId=${employeeId}`);
}
